Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #4890 #4891

Merged
merged 2 commits into from
Feb 28, 2025
Merged

Fix #4890 #4891

merged 2 commits into from
Feb 28, 2025

Conversation

Feoramund
Copy link
Contributor

@Feoramund Feoramund commented Feb 27, 2025

Note that this change will forcibly break any usage of to_cstring with a non-optional, extra Allocator_Error return value.

Fixes #4890

`strings.to_cstring` previously would not check if the buffer could
handle the extra null byte and could lead to segmentation violations
when using the resulting string in an API expecting the terminator.
@gingerBill gingerBill merged commit 8a8894a into odin-lang:master Feb 28, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

String builder to_cstring is unsafe
2 participants